package com.hospital.common.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class TDiagnosisRecord {
    /**
    * 诊疗记录id
    */
    private Long id;

    /**
    * 患者id
    */
    private Long patientId;

    /**
    * 就诊卡号
    */
    private String medicalCard;

    /**
    * 患者姓名
    */
    private String patientName;

    /**
    * 性别(0男1女)
    */
    private Integer sex;

    /**
    * 证件卡号
    */
    private String identityCard;

    /**
    * 地址
    */
    private String address;

    /**
    * 电话
    */
    private String phone;

    /**
    * 药物过敏(0无,1有)
    */
    private Integer drugAllergy;

    /**
    * 药物过敏历史
    */
    private String drugAllergyInfo;

    /**
    * 挂号时间
    */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime registrationTime;

    /**
    * 就诊时间
    */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime createTime;

    /**
    * 科室
    */
    private String department;

    /**
    * 科室id
    */
    private Long departmentId;

    /**
    * 医生姓名
    */
    private String doctorName;

    /**
    * 医生id
    */
    private Long doctorId;

    /**
    * 是否复诊(0否,1是)
    */
    private Integer referral;

    /**
    * 是否为慢性病患者(0否,1是)
    */
    private Integer chronicDiseases;

    /**
    * 患者主诉
    */
    private String patientComplaints;

    /**
    * 主要诊断
    */
    private String primaryDiagnosis;

    /**
    * 药物总费
    */
    private Double medicationCosts;

    /**
    * 就诊费
    */
    private Double consultationFee;

    /**
    * 药物表
    */
    private String medication;

    /**
    * 总费用
    */
    private Double totalCosts;

    /**
    * 检查结论
    */
    private String diagnosisResult;
}